<%@ page language="java" pageEncoding="UTF-8"%>

<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic"%>
<%@ taglib uri="http://struts.apache.org/tags-tiles" prefix="tiles"%>

<logic:notPresent name="userName" scope="session">
	<logic:redirect forward="login"></logic:redirect>
</logic:notPresent>

<logic:notEqual name="userName" scope="session" value="admin">
	<logic:redirect forward="login"></logic:redirect>
</logic:notEqual>

<script type="text/javascript" src="js/calendarDateInput.js">
</script>


<logic:present name="info" scope="request">
	<font color="red"><bean:write name="info" scope="request" /> </font>
</logic:present>
<html:form action="/addProjectSubmit" focus="projectname">

	<table>
		<tr>
			<td>
				项目名称 :
			</td>
			<td>
				<html:text property="projectname" />
				<html:errors property="projectname" />
			</td>
		</tr>
		<tr>
			<td>
				项目要求 :
			</td>
			<td>
				<html:textarea property="requirement" rows="5" cols="40" />
				<html:errors property="requirement" />
			</td>
		</tr>

		<tr>
			<td>
				项目价格 :
			</td>
			<td>
				<html:text property="price" />
				<html:errors property="price" />
			</td>
		</tr>
		<tr>
			<td>
				项目启动时间 :
			</td>
			<td>
				<script>DateInput('launchtime', true, 'YYYY-MM-DD')</script>

			</td>
		</tr>
		<tr>
			<td>
				要求完成时间 :
			</td>
			<td>
				<script>DateInput('duetime', true, 'YYYY-MM-DD')</script>

			</td>
		</tr>
		<tr>
			<td>
				项目状态 :
			</td>
			<td>
				<html:radio property="status" value="0" />
				项目申请
				<br />
				<html:radio property="status" value="1" />
				申请结束
				<br />
				<html:radio property="status" value="2" />
				项目结束
				<br />
				<html:errors property="status" />
			</td>
		</tr>

		<tr>
			<td>
				项目资源 :
			</td>
			<td>
				<html:textarea property="resource" rows="5" cols="40" />
				<html:errors property="resource" />
			</td>
		</tr>

		<tr>
			<td>
				项目积分 :
			</td>
			<td>
				<html:text property="point" />
				<html:errors property="point" />
			</td>
		</tr>
		<tr>
			<td>
				备注 :
			</td>
			<td>
				<html:textarea property="remark" rows="5" cols="40" />
				<html:errors property="remark" />
			</td>
		</tr>
		<tr>
			<td colspan="2" align="center">
				<html:submit value="发布项目" />
			</td>
		</tr>
	</table>
</html:form>
